package net.openl10n.api.document;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;

import net.openl10n.api.Namespaces;

@XmlType(name="resourceType", namespace=Namespaces.DOCUMENT)
@XmlSeeAlso({TextFlow.class, Container.class, Reference.class})  // TODO DataHook.class?
public abstract class Resource {

	private String id;
	private long version = 1;
	
	public Resource() {
	}
	
	public Resource(String id) {
		this.id = id;
	}

	@XmlAttribute(name="id", required=true)
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	@XmlAttribute(name="version", required=true)
	public long getVersion() {
		return version;
	}
	
	public void setVersion(long version) {
		this.version = version;
	}
	

}
